package com.gitee.wsl.mathematics.matrix.mat4.ext

import com.gitee.wsl.mathematics.matrix.mat4.Matrix4

fun<T:Number> Matrix4<T, *, *>.toMat3() = createMat3 {res->

    res[0, 0] = this[0, 0]
    res[0, 1] = this[0, 1]
    res[0, 2] = this[0, 2]

    res[1, 0] = this[1, 0]
    res[1, 1] = this[1, 1]
    res[1, 2] = this[1, 2]

    res[2, 0] = this[2, 0]
    res[2, 1] = this[2, 1]
    res[2, 2] = this[2, 2]

}